const crypto = require('crypto');

const passwordHandler =function (password) {
    const md5 = crypto.createHash('md5');   // 创建一个md5对象    参数：md5, sha1, sha256, sha512
    return md5.update(password).digest('hex');
};
module.exports = passwordHandler;